package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReversesTheOrderOfTheGivenArray {
	public static <E> void reverseArray(E[] array) {

		int i = 0;
		int j = array.length - 1;
		E tmp;

		while (j > i) {
			tmp = array[j];
			array[j] = array[i];
			array[i] = tmp;
			j--;
			i++;
		}
	}
}
